﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using Corrigiendo.Models;
using Corrigiendo.Controllers;

namespace Corrigiendo
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            generarListaDeAlumnos();
        }

        protected void generarListaDeAlumnos()
        {
     
            Alumno alumno1 = new Alumno("Diego", "Perez", "AccentureAbr2014", 18000001);
            alumno1.calificarAlumno(7);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Roberta", "Perez", "AccentureAbr2014", 18000001);
            alumno1.calificarAlumno(8);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Jose", "Gomez", "AccentureAbr2014", 18000001);
            alumno1.calificarAlumno(9);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Manolo", "Pereyra", "AccentureMay2014", 18000001);
            alumno1.calificarAlumno(5);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Aquiles", "Suares", "AccentureMay2014", 18000001);
            alumno1.calificarAlumno(4);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Veronica", "Benitez", "AccentureMay2014", 18000001);
            alumno1.calificarAlumno(7);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Mirta", "Martinez", "AccentureJun2014", 18000001);
            alumno1.calificarAlumno(9);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Riquelme", "Algaba", "AccentureJun2014", 18000001);
            alumno1.calificarAlumno(8);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Carlos", "Montiel", "AccentureJul2014", 18000001);
            alumno1.calificarAlumno(10);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Horacio", "Tarnowsky", "AccentureJul2014", 18000001);
            alumno1.calificarAlumno(9);
            CursoController.academia.Add(alumno1);
            alumno1 = new Alumno("Pedro", "Neglis", "AccentureJul2014", 18000001);
            alumno1.calificarAlumno(3);

            CursoController.academia.Add(alumno1);

        }
    }
}